package maxPower;

public class Solution {
    public int maxPower(String s) {
        //
        int ans = 1;
        int cur = 1;
        for (int i = 1; i < s.length(); i++) {
            if(s.charAt(i) == s.charAt(i-1)) {
                cur++;
            } else {
                ans = Math.max(cur,ans);
                cur = 1;
            }
        }
        return ans;
    }
}
